VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Long <-> Short Path Conversion via API Win95 and NT4 Friendly (Updated)

by Nick Campbeln (7 Submissions)
Category: VB function enhancement
Compatability: Visual Basic 5.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (9 Votes)

This code module gives you the ability to convert between short (DOS style 8.3) and long paths under ANY Win32 system. If you've ever had to do path conversions with the API you know that Win95/NT4 does not support the GetLongPathName() API which allows for short to long path name conversions. Those of you who have looked for a solution may have found David Goben’s wonderful (though poorly commented) GetLongPath() function on SearchVB.com, but it relies on the FileSystemObject (which did me no good). So I built this module which utilizes both conversion APIs (GetShortPathName() and GetLongPathName()) on the systems that support them (Win98+). For systems that do not support GetLongPathName() (Win95/NT4) the GetShortPathName() API is used along with Dir() to determine the long path name from the passed short path name. The code is very well commented but is not thoroughly tested; so if you find a bug, please let me know!. Thanks and enjoy!

Rate Long <-> Short Path Conversion via API Win95 and NT4 Friendly (Updated)

Download Long <-> Short Path Conversion via API Win95 and NT4 Friendly (Updated)

Download Long <-> Short Path Conversion via API Win95 and NT4 Friendly (Updated) (3 KB)

Long <-> Short Path Conversion via API Win95 and NT4 Friendly (Updated) Comments

No comments have been posted about Long <-> Short Path Conversion via API Win95 and NT4 Friendly (Updated). Why not be the first to post a comment about Long <-> Short Path Conversion via API Win95 and NT4 Friendly (Updated).

Post your comment

Subject:
Message:
0/1000 characters